package org.com.behavioralPattern.visitorPattern;

/**
 * @author Jonny
 * @version 1.0
 * @Description:
 * @date 2021/4/27 18:17
 */
public class Computer {
    private Hardware CPU;
    private Hardware Harddisk;
    public Computer(){
        this.CPU=new CPU("Intel i7 9000k");
        this.Harddisk=new Harddisk("Seagate 1T SSD");
    }

    public void accept(ComputerVisitor computerVisitor){
        CPU.accept(computerVisitor);
        Harddisk.accept(computerVisitor);
    }
}
